package com.mengniu.commerce.admin.api;

import com.mengniu.commerce.admin.api.domain.SysStore;
import com.mengniu.commerce.admin.api.factory.RemoteStoreFallbackFactory;
import com.mengniu.commerce.common.core.constant.SecurityConstants;
import com.mengniu.commerce.common.core.constant.ServiceNameConstants;
import com.mengniu.commerce.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
* @Description: 店铺服务
* @Param:
* @return:
* @Author: zfw
* @Date: 2023/11/28
* @Date: 11:57
*/
@FeignClient(contextId = "remoteStoreService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteStoreFallbackFactory.class)
public interface RemoteStoreService
{
    /**
    * @Description: 通过店铺ID 查询店铺列表
    * @Param: [username, source]
    * @return: com.mengniu.commerce.common.core.domain.R<com.mengniu.commerce.admin.api.domain.SysStore>
    * @Author: zfw
    * @Date: 2023/11/28
    * @Date: 11:59
    */
    @GetMapping("/api/store/info/{storeCode}")
    public R<SysStore> getStoreInfo(@PathVariable("storeCode") String storeCode, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
